<!DOCTYPE html>
<HTML>
	<HEAD>
		<TITLE> ZTREE DEMO - radio</TITLE>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="../../static/zTreeStyle/zTreeStyle.css" type="text/css">
		<link rel="stylesheet" href="../../static/zTreeStyle/demo.css" type="text/css">
		<link rel="stylesheet" href="../../layui/css/layui.css" />
		<script type="text/javascript" src="../../js/jquery-2.1.4.js"></script>
		<script type="text/javascript" src="../../static/zTreeStyle/jquery.ztree.core.js"></script>
		<script type="text/javascript" src="../../static/zTreeStyle/jquery.ztree.excheck.js"></script>
		<script type="text/javascript" src="../../layui/layui.js"></script>
		<SCRIPT type="text/javascript">
			<!--
			var setting = {
				check: {
					enable: true,
					chkStyle: "radio",
					radioType: "level"
				},
				data: {
					simpleData: {
						enable: true
					}
				}
			};

			var zNodes = [{
					id: 12,
					pId: 1,
					name: "波轮洗衣机"
				},
				{
					id: 121,
					pId: 12,
					name: "随意勾选 1-2-1"
				},
				{
					id: 122,
					pId: 12,
					name: "随意勾选 1-2-2"
				},
				{
					id: 22,
					pId: 2,
					name: "滚筒洗衣机"
				},
				{
					id: 221,
					pId: 22,
					name: "洗衣程序"
				},
				{
					id: 222,
					pId: 22,
					name: "设定的烘干程序"
				},
				{
					id: 223,
					pId: 22,
					name: "蜂鸣音静音"
				},
				{
					id: 224,
					pId: 22,
					name: "智慧洗衣程序"
				},
				{
					id: 225,
					pId: 22,
					name: "语音功能"
				},
				{
					id: 226,
					pId: 22,
					name: "强力去污/超净洗"
				},
				{
					id: 227,
					pId: 22,
					name: "消毒剂自动投放"
				},
				{
					id: 228,
					pId: 22,
					name: "洗涤剂自动投放"
				},
				{
					id: 229,
					pId: 22,
					name: "柔顺剂自动投放"
				},
				{
					id: 230,
					pId: 22,
					name: "净水洗"
				},
				{
					id: 231,
					pId: 22,
					name: "预约功能"
				},
				{
					id: 232,
					pId: 22,
					name: "防过敏"
				},
				{
					id: 233,
					pId: 22,
					name: "程序的运行阶段"
				},
				{
					id: 234,
					pId: 22,
					name: "开关机"
				},
				{
					id: 235,
					pId: 22,
					name: "远程控制功能"
				},
				{
					id: 236,
					pId: 22,
					name: "用水量"
				},
				{
					id: 237,
					pId: 22,
					name: "延时待机"
				},
				{
					id: 238,
					pId: 22,
					name: "门锁状态"
				},
				{
					id: 239,
					pId: 22,
					name: "程序运行状态"
				},
				{
					id: 240,
					pId: 22,
					name: "启停状态"
				},
				{
					id: 241,
					pId: 22,
					name: "筒门状态"
				},
				{
					id: 242,
					pId: 22,
					name: "洗衣程序运行完抖散"
				},
				{
					id: 243,
					pId: 22,
					name: "洗衣程序运行完烘干"
				},
				{
					id: 244,
					pId: 22,
					name: "有无需干洗衣物"
				},
				{
					id: 245,
					pId: 22,
					name: "生产测试命令"
				},
				{
					id: 246,
					pId: 22,
					name: "减漂洗操作"
				},
				{
					id: 247,
					pId: 22,
					name: "增漂洗操作"
				},
				{
					id: 248,
					pId: 22,
					name: "当前剩余/预约时间（min）"
				},
				{
					id: 249,
					pId: 22,
					name: "提示信息1"
				},
				{
					id: 250,
					pId: 22,
					name: "累计周期内洗涤次数"
				},
				{
					id: 251,
					pId: 22,
					name: "累计洗涤周期"
				},
				{
					id: 252,
					pId: 22,
					name: "强制删除"
				},


			];

			var code;

			function setCheck() {
				var type = $("#level").attr("checked") ? "level" : "all";
				setting.check.radioType = type;
				showCode('setting.check.radioType = "' + type + '";');
				$.fn.zTree.init($("#treeDemo"), setting, zNodes);
			}

			function showCode(str) {
				if (!code) code = $("#code");
				code.empty();
				code.append("<li>" + str + "</li>");
			}

			$(document).ready(function() {
				setCheck();
				$("#level").bind("change", setCheck);
				$("#all").bind("change", setCheck);
			});
			//-->
		</SCRIPT>
	</HEAD>

	<BODY>
		<div class="content_wrap">
			<div class="zTreeDemoBackground left">
				<ul id="treeDemo" class="ztree"></ul>
			</div>
			<div class="right">
				<form class="layui-form">
					<div class="layui-form-item">
						<label class="layui-form-label" class="layui-se">所属于设备类型：</label>
						<div class="layui-input-inline">
							<select name="operation" class="layui-input">
								<option value="">请选择所述类型</option>
								<option value="1">波轮洗衣机</option>
								<option value="2">滚筒洗衣机</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">传感参数编码：</label>
						<div class="layui-input-inline">
							<input type="text" name="jieshushijian" id="jieshushijian" class="layui-input" placeholder="传感参数编码">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">传感参数名称（CN）：</label>
						<div class="layui-input-inline">
							<input type="text" name="jieshushijian" id="jieshushijian" class="layui-input" placeholder="传感参数名称（CN）">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">传感参数名称（EN）：</label>
						<div class="layui-input-inline">
							<input type="text" name="jieshushijian" id="jieshushijian" class="layui-input" placeholder="传感参数名称（EN）">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label" class="layui-se">是否为连续量：</label>
						<div class="layui-input-inline">
							<select name="operation" class="layui-input">
								<option value="1">是</option>
								<option value="2">否</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label" class="layui-se">所述坐标系：</label>
						<div class="layui-input-inline">
							<select name="operation" class="layui-input">

								<option value="0">无</option>
								<option value="2">水量（L）</option>
							</select>
						</div>
					</div>
					<button class="layui-btn layui-bg-blue" style="margin-left: 10px;">新建</button>
					<button class="layui-btn layui-bg-blue" style="margin-left: 10px;">修改</button>
					<button class="layui-btn layui-bg-blue" style="margin-left: 10px;">删除</button>
			</div>
			</form>
			<script>
				layui.use(['form', 'element'], function() {
					var element = layui.element;
				})
			</script>
		</div>
		</div>
	</BODY>
</HTML>
